package week_04;

import java.util.List;

public class TwitterTest2 {
    public static void main(String[] args) {
        //["Twitter","postTweet","follow","follow","getNewsFeed",
        //[],[1,5],[1,2],[2,1],[2]
        Twitter twitter = new Twitter();
        twitter.postTweet(1, 5);
        twitter.follow(1, 2);
        twitter.follow(1, 2);
        List<Integer> feeds = twitter.getNewsFeed(2);
        feeds.forEach(x -> System.out.print(x + ","));
        System.out.println("--------");

        //"postTweet","getNewsFeed","getNewsFeed","unfollow","getNewsFeed",
        //[2,6],[1],[2],[2,1],[1]
        twitter.postTweet(2, 6);
        feeds = twitter.getNewsFeed(1);
        feeds.forEach(x -> System.out.print(x + ","));
        System.out.println("--------");
        feeds = twitter.getNewsFeed(2);
        feeds.forEach(x -> System.out.print(x + ","));
        System.out.println("--------");
        twitter.unfollow(2, 1);
        feeds = twitter.getNewsFeed(1);
        feeds.forEach(x -> System.out.print(x + ","));

        //"getNewsFeed","unfollow","getNewsFeed","getNewsFeed"]
        //[2],[1,2],[1],[2]
        feeds = twitter.getNewsFeed(2);
        feeds.forEach(x -> System.out.print(x + ","));
        twitter.unfollow(1, 2);
        System.out.println("--------");
        feeds = twitter.getNewsFeed(1);
        feeds.forEach(x -> System.out.print(x + ","));
        System.out.println("--------");
        feeds = twitter.getNewsFeed(2);
        feeds.forEach(x -> System.out.print(x + ","));


    }

}
